package com.wbsxch.example.springsecurity.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wbsxch.example.springsecurity.entity.Permission;
import com.wbsxch.example.springsecurity.entity.User;
import com.wbsxch.example.springsecurity.mapper.UserMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.retry.annotation.EnableRetry;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 快乐在角落里
 * @since 2019-03-05
 */
@Service
@EnableRetry
public class UserService extends ServiceImpl<UserMapper, User> implements IService<User> {

    public List<Permission> selectPermissionByUserId(Integer userId){
        return baseMapper.selectPermissionByUserId(userId);
    }

    @Retryable
    public void 呵呵(){
        System.out.println("呵呵");
    }
}
